import apibase from "@/api/apiBase";
import axios from "axios";
import { offlinRechargeInterface, accountDetailInterface } from "./PrePaidDepositAccount.interface";

//上传转账凭证
export const $offlinRecharge = (params: offlinRechargeInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/travel/api/user/offlinRecharge',
    data: params,
    instance,
  });
}

//充值列表
export const $getRechargeList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/user/rechargeList',
    data: params,
    instance,
  });
}

//账户余额及流水统计
export const $getAccountStatistic= () => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/user/accountStatistic',
    data: {},
    instance,
  });
}


//账户余额流水
export const $getAccountList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/user/accountList',
    data: params,
    instance,
  });
}

//账户余额流水详情
export const $getAccountDetail = (params: accountDetailInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/user/rechargeVoucher',
    data: params,
    instance,
  });
}